<?php
/*
	Copyright 2006, 2007, 2008, 2009, 2010 Bastiaan Grutters
    
    This file is part of Ages of Strife website.

    Ages of Strife website is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Ages of Strife website is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Ages of Strife website.  If not, see <http://www.gnu.org/licenses/>.
 */
include( "../global/initialize.php");

aos_header( 'Concepts' );

$query = "SELECT open_shop FROM game LIMIT 1";
$result = mysql_query( $query ) or die( "Query failed : " . mysql_error() );
$row = mysql_fetch_array( $result, MYSQL_ASSOC );

$open_shop = $row[ 'open_shop' ];

$list = Array();
$list[ 'Villages' ] = "Villages are places on the map where people live. " .
		"When you start the game you have control over one such village, your capital.\n" .
		"You can discover the location of other villages by performing scout missions or moving armies over the map.\n" .
		"In villages you can order the construction of buildings which improve the village so it can support a larger population or produce more resources. There are also a number of special buildings which help your village in a different way.";
$list[ 'Buildings' ] = "Buildings are located in a village and have multiple functions. Some buildings produce more resources and others help in other ways, like improving the villages defense.\n" .
		"<a href=\"building_info.php\">Here</a> is a list of buildings.";
$list[ 'Armies' ] = "Armies are a group of trained soldiers.\nYou can create 1 army for every village that you have under your control, so if you have 3 villages you can create 3 armies.\n" .
		"There are 4 types of trained soldiers, you can see a list of them <a href=\"unit_info.php\">here</a>.\nYou can train new recruits into soldiers in an army.\n" .
		"You move armies over the map, if you move an army to a hostile village you are attacking that village. When you are at a certain coordinate on the map where a hostile army is at the same time there will be a battle.\n" .
		"If your army is at a hostile village and there is no army to defend it you will be able to conquer the village. (Except if it is a capital, see pillaging for more information)\n" .
		"Armies can also be send on missions to perform certain tasks, see Missions for more information. An army larger then 50,000 or allied armies combined to more then 50,000 do less damage in battles due to the available frontline room.";
$list[ 'Fortifying' ] = "An army can perform a fortify mission in which it digs itself in. If it has any artilery it will bombard any hostile armies within 3 squares of it's location.\n" .
		"When an army is fortified it can not move, perform missions or train new recruits. It first has to dig out before all those options become available again.\n" .
		"Fortified armies gain a 10% defense bonus in battles.";
$list[ 'Missions' ] = "Armies can perform missions, the most important mission is the scout mission which can only be performed by an army with scouts.\n" .
		"On a scout mission the army will try to discover any villages which are close to it's location. The larger the scout mission the more villages discovered.\n" .
		"You can also dig in an army, so it has better defense and can bombard nearby hostile armies. For more information see Fortifying.";
$list[ 'Diplomacy' ] = "At the diplomacy tab you can send letters to other players, take care of any faction business and bet on horse race teams.\n";
$list[ 'Factions' ] = "Factions are groups of players working together.\n" .
		"It is usually best to be in a faction, since it gives you more protection and there are faction policies which you can benefit from.\n" .
		"Faction policies can give you more food, coal or iron output or give you a war advantage. Each policy costs a certain amount of gold each turn, this is based on the number of villages the faction members control. " .
		"The more villages under faction control the more expensive the policies.";
$list[ 'Map' ] = "The map of the game world can be found <a href=\"../operations/map.php\">here</a>.\nThere you can view the game world. If no coordinates are supplied the map will center on your capital.\n" .
		"You can see all villages you have discovered as well as armies currently in your range. Green villages and armies are yours, blue are from faction members and red are all the others.\n" .
		"Inactive, resigned or permanently banned players are shown differently.";
$list[ 'Operations' ] = "At the Operations tab you can see which armies are currently moving (within your visible range) and all the visible stationed armies.\n" .
		"There is a sub tab for the map, missions and expeditions. See the topics about these tabs for more information.";
$list[ 'Score' ] = "Each players score is calculated at the end of a turn, score is comprised of all the resources, villages and armies a player has.";
$list[ 'Buddies' ] = "Since the game world is reset every round it can be nice to keep track of people you met in the game through buddies.\n" .
		"Everyone you add here will still be here the next round, even if they change their ruler name. You can also set how much information they can see about you, for example you can allow them to see when you were last online or what your email address is.\r" .
		"\nWhen you add a new buddy all your information is hidden.";
$list[ 'Rounds' ] = "Ages of Strife has a persistent game world during a round, a round takes a set amount of turns, usually 3,000.\n" .
		"With the normal speed of 1 turn per hour a 3,000 turns round takes just over 4 months.\n" .
		"At the end of the round top 10 players are stored and the world is reset.\nPlayers can join the game throughout a round since a new sector is added to the map whener the game is full.\n" .
		"Players joining the game later on are at a disadvantage because players who started before them already had time to grow, to give players starting later on a bigger chance the newly added sectors are protected against any player who started earlier for 800 turns.\n" .
		"They also get more space for buildings in their capital and Upgrades which have been completed many times will become cheaper.";
$list[ 'Pillaging' ] = "When you move an army over a hostile capital and there is no battle going on at the capital you can pillage the capital to steal it's owners resources.\n" .
		"Pillaging works like conquering only twice the population will defend and instead of taking the village you steal part of the owners resources.\n" .
		"Additionally the capital owner will take a significant military morale penalty.";
$list[ 'Upgrades' ] = "Upgrades help you increase your empire and improve your villages.\n" .
		"Some upgrades expand an abbility, for example you need to perform upgrades to be able to control more villages or you need certain upgrades to get more resources.\n" .
		"A list of all upgrades can be found <a href=\"upgrade_info.php\">here</a>.";
$list[ 'Military morale' ] = "As soon as your total military exceeds 100,000 men, you will have to deal with their morale.\n" .
		"Military morale starts to decline when you have not been in any battles for some time.\n" .
		"As discontent grows it will affect your resource production, for example when morale is low production is reduced by 20% and recruitment by 40%.\n" .
		"You can improve your militaries morale by paying your soldiers, this can be done through the <a href=\"../armies/armies.php\">armies page</a>,\nthe more men you have in your military the more gold it will cost.\n" .
		"The longer your soldiers have gone without being in any battle, the faster their morale will decline. Winning battles will improve their morale as well as reset the decline rate, losing battles will reset the morale decline rate but not improve morale.\n" .
		"To see more information about your militaries morale or to pay your soldiers, click <a href=\"../armies/morale.php\">here</a>.";
if( $open_shop == 1 ) {
	$list[ 'Premium turns' ] = "Premium turns can be bought in the Ages of Strife shop.\n" .
		"While you have premium turns you will not be shown any advertisements and instead some information about your account is shown.\n" .
		"\n" .
		"In addition to buying premium turns you can also win premium turns by finishing in the top 3 of economy or war points.\n" .
		"Only rulers who are not resigned or banned are elegible to receive premium turns.\n" .
		"\n" .
		"For more information about premium turns or purchasing premium turns visit the <a href=\"../global/shop.php\">premium turns shop</a>.";
}
$list[ 'Economy points' ] = "Economy points are a way to determine who has been the best scoring player throughout the entire round.\n" .
		"Each turn you get economy points for every ruler with less score then you, so the higher your rank the more points you get.\n" .
		"If you have a high rank throughout the two thirds of the game but lose a lot of score near the end, you will still have a high economy score.\n" .
		"Economy points measure your score for the entire round.";
$list[ 'War points' ] = "War points are a way to determine who determine who has been the player with the most battlescore throughout the round.\n" .
		"Each turn you get war points for every ruler with less battlescore then you, so the higher your battle rank the more points you get.\n" .
		"If you have a high battle rank early in the game, but get a lower battle rank later on, you can still end up high in war points since it depends on who had the highest rank the longest.\n" .
		"War points measure your battlescore for the entire round.";
$list[ 'Battlescore' ] = "Battlescore is given for battles and bombardments, you receive the score of the units you kill and half the score of the units you lose.\n";
$list[ 'Tax' ] = "At the overview page you can see your gold (from tax collection), coal and iron income.\n" .
		"You can change your tax settings here. The more you tax your population the more gold you will receive each turn.\n" .
		"But high taxes come at a price, your miners will be less motivated and so you will receive less coal and iron per turn.\n" .
		"Low taxes on the other hand will increase the coal and iron per game day, while lowering your gold per turn.\n" .
		"On normal taxes you receive a balance between gold and iron and coal each turn.\n" .
		"You receive 1 gold per turn for 606 population on normal taxes, on low taxes for 740 villagers, and with high taxes you get 1 gold for every 512 villagers.";
$list[ 'Village qualities' ] = "Each village has its own food, iron and coal quality, this means how much food, iron or coal can be extracted.\n" .
		"If for example a village has a food quality of 50, then farms in that village will have an output of 50%.\n" .
		"To get the most out of your villages it is mostly good to focus on a villages best quality resource.\n" .
		"Quality can be influenced by several things, there are buildings which increase the quality by 50% (so base quality of 50 becomes 75),\n" .
		"some faction policies can increase quality and low military morale will decrease quality.";
$list[ 'Army instructions' ] = "An army with an officer can be set to 3 different instructions: stand ground, defensive or aggressive.\n" .
		"When instructed to stand ground the army will hold its position no matter what armies approach.\n" .
		"On defensive the army will retreat when larger enemies approach it.\n" .
		"If aggressive is selected the army will retreat from stronger enemies, but if smaller enemies are close by it will try to engage them in battle.\n" .
		"The officers making these decisions expect any friendly armies close by to help them attack and defend.\n" .
		"When an army is following another army, it takes the instructions from the army it is following.";
$list[ 'Food consumption' ] = "Each villager eats 1 tenth of food per game day.\n" .
		"So 1,000 people eat 100 food each day.";
$list[ 'Officers skill points' ] = "Each officer receives skill points when he obtains a certain amount of experience.\n" .
		"These skill points can be used to improve the officer in 5 different ways.\n" .
		"You can improve the officers attack bonus by 2% per skill point with a maximum of 5.\n" .
		"You can improve the officers defense bonus by 2% per skill point with a maximum of 5.\n" .
		"You can improve the officers scout range by 1 square per skill point with a maximum of 5.\n" .
		"You can improve the officers persuasion, which allows cheaper bribing and easier conquest of villages with a maximum of 5 levels.\n" .
		"You can increase the maximum allowed rank for the officer by 1 per skill point with a maximum of 5.";
$list[ 'Loyalty' ] = "Each village has a loyalty towards a ruler.\n" .
		"When you bribe a village it will have a loyalty of 50% towards you.\n" .
		"Each turn you control the village it's loyalty towards you will increase.\n" .
		"If you conquer a village with 100% loyalty towards another player you will have to keep it occupied until it has reached 50% loyalty towards you.\n" .
		"Unloyal villages which are not occupied will rebel and join the ruler they are loyal towards.";
$list[ 'Risk' ] = "Officers can be instructed to take risks in battles.\n" .
		"An officer can be set to take between 10% to 50% risk, the officer will either gain this as a defense and offense bonus or as a penalty.\n" .
		"When the officer gains more experience chances to get a positive bonus are increased.";
$list[ 'Wounded' ] = "In battle 40% of the soldiers which are removed from the involved armies are considered wounded.\n" .
		"Wounded soldiers will take some time to heal before they can join up with any army again, this takes 24 game days.\n" .
		"After 24 game days they will be available in global reserves to be asigned to an army.";
$list[ 'Game days' ] = "Game days (or turns) progress at the start of each hour, for example at 13:00, 14:00, 15:00, etc.\n" .
		"Updating takes between a second and a couple of minutes depending on the number of active players and how far they progressed.\n" .
		"Some actions in the game are performed immediatly but most take one or more game days to complete.";
$list[ 'Supply' ] = "Each army takes supplies with it, when an is standing still supplies replenish and when moving they are depleted.\n" .
		"Each turn of movement takes 1 supply, when stationary an army replenishes 1 supply each turn,\n" .
		"except when the army is located in a friendly village in which supply is increased by 3 each turn.\n" .
		"The maximum amount of supply an army can carry depends on the armies composition.\n" .
		"Infantry and scouts can have a maximum of 25 supply. Cavalry has a maximum of 40 supply.\n" .
		"Artillery has a maximum of only 10 supply, but if the same army has at least the same number of cavalry as artillery\n" .
		"then the maximum supply is 25. With all other combinations of unit types the maximum supply is equal to\n" .
		"the maximum supply of the unit type which has the least maximum supply.";
$list[ 'Automatic worker assignment' ] = "In order to produce food, extract coal or extract iron workers need to be assigned. " .
		"Users with premium turns have the option to let these workers be automatically assigned " .
		"or choose to assign them manually. Other users can only assign them manually.";
$list[ 'Seasons' ] = "There are four seasons in Ages of Strife. Spring starts on the first of March and continues until the end of May. " .
		"Summer starts on the first of June until the end of August, autumn starts on the first of September and continues until the end of November " .
		"and finally winter is from the first of December until the end of February. " .
		"Seasons influence the amount of food produced. During spring and autumn the normal amount of food is produced. " .
		"But during the summer food production is doubled and during the winter there is no food production at all. " .
		"Stockpile food during the summer so your people won't go without food during the winter. The duration of the winter is about 90 game days.";
$list[ 'Food priority' ] = "Whenever you run out of food your population will prioritize food production over everything else, except during winters, will be explained below. " .
		"This means all non production building jobs are occupied, but workers will also pick up any possible farming job. " .
		"No mining will happen until stored food rises above zero again. " .
		"Since there is no food production during the winter this won't happen, if you run out of food during the winter part of the population will starve.";
$list[ 'Transfer workers' ] = "When you have multiple villages it is possible to send workers from a village to another village. " .
		"These workers will receive a 50% penalty though, for example if you send 100 workers to another village, there will only be 50 workers added there. " .
		"Regardless of this penalty it can be useful to transfer workers, so not all villages will require housing.";
$list[ 'Population' ] = "You can specify a maximum population for each village, the village will continue to grow until it reaches this maximum. " .
		"If this number would exceed your housing this part of your population would become homeless. " .
		"Homeless population does not work or pay taxes, they do consume food though and help defend in case of conquest. " .
		"60% of your population will become workers, you can asign workers to food, iron or coal production. " .
		"Workers without jobs are unemployed, they do pay taxes, but workers with jobs produce resources and pay taxes, " .
		"so it is preferable to provide as many as possible with jobs. " .
		"Keeping a large part of your population can be usefull in certain situations, military recruitment among unemployed is a lot higher compared to recruitment among workers with jobs.";
$list[ 'New battlescore' ] = "This is battle score you recently received. Every 120 turns you will be rewarded for the battlescore you gained during the last 120 turns. 
Men will voluntary join you based upon the amount and size of battles you encountered during that time.";
$list[ 'Battle size' ] = "During battles allied combined army size determines if an army receives a penalty due to not being able to aproach the frontline. 
		When this combined size exceeds 100,000 the damage their damage will still remain at 50,000 of their men. 
		Combined armies exceeding 500,000 men get an additional penalty reducing the number of troops which can effectively fight below 100,000.";
ksort( $list );
?>
					<div class="blok">
<?php
foreach ( $list AS $title => $text ) {
	print( "<a name=\"" . strtolower( $title ) . "\"></a><a name=\"$title\"></a><strong>" . translate( $title ) . "</strong><br />" );
	print( "<pre>" . wordwrap( translate ( $text ), 120, "\n" )  . "</pre><br /><br />" );
}
?>
						<br />
						<?php transprint( 'Is anything missing, do you have a correction or an addition?' ); ?><br />
						<?php transprint( 'Tell me, click <a href="../diplomacy/send_letter.php?to=Zworf">here</a> to send a letter to me (Zworf).' ); ?><br />
					</div>
<?php
aos_footer();
?>
